using System;

namespace OrbitOne.Elmah.Logic
{
    /// <summary>
    /// Represents an agent.
    /// </summary>
    public class Agent
    {
        #region Properties
        /// <summary>
        /// Gets the name of the agent
        /// </summary>
        public string Name { get; private set; }
        /// <summary>
        /// Gets the description of the agent
        /// </summary>
        public string Description { get; private set; }
        /// <summary>
        /// Gets the creation date.
        /// </summary>
        public DateTime CreatedOn { get; private set; } 
        /// <summary>
        /// Gets the last heartbeat of the agent
        /// </summary>
        public DateTime LastHeartbeat { get; private set; }
        /// <summary>
        /// Gets wether the agent is alive or not.
        /// </summary>
        public bool IsAlive { get; private set; } 
        #endregion

        #region Constructor
        /// <summary>
        /// Creates a new agent.
        /// </summary>
        /// <param name="name">The name of the agent.</param>
        /// <param name="description">The description of the agent.</param>
        /// <param name="lastHeartbeat">The last heartbeat of the agent.</param>
        /// <param name="createdOn">The creation time of the agent.</param>
        /// <param name="isAlive">Is the agent alive?</param>
        public Agent(string name, string description, DateTime lastHeartbeat,DateTime createdOn, bool isAlive)
        {
            this.Name = name;
            this.Description = description;
            this.LastHeartbeat = lastHeartbeat;
            this.CreatedOn = createdOn;
            this.IsAlive = isAlive;
        } 
        #endregion
    }
}